package com.sinaapp.gavinzhang.jianzhioffer;

/**
 * 青蛙跳台阶
 * Created by gavin on 15-9-4.
 */
public class JumpFloor {
    public static void main(String[] args){

    }

    public static int JumpFloor(int target)
    {
        if (target <= 0)return 0;
        if (target == 1)return 1;
        if (target == 2)return 2;
        return JumpFloor(target-1)+JumpFloor(target-2);
    }

    public static int mutiJumpFloor(int target){
        if (target == 0)return 1;
        if (target == 1)return 1;
        return 2*mutiJumpFloor(target-1);
    }
}
